package app.cn.com.school.activity

import android.content.ContentValues
import android.content.Context
import android.content.Intent
import android.os.Bundle
import app.cn.com.school.R
import app.cn.com.school.adapter.ElectAdapter
import app.cn.com.school.databinding.ActivityApplyElectBinding

class ApplyElectActivity : BaseActivity<ActivityApplyElectBinding>() {
    override fun initBindingVar() {
    }

    override fun initTitle() {
    }

    var adapter: ElectAdapter? = null
    var moerList=ArrayList<ContentValues>()
    lateinit var context:Context
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        initBinding(R.layout.activity_apply_elect)
        context=this
        initView()
    }

    private fun initView(){
        moerList.add(ContentValues())
        moerList.add(ContentValues())
        moerList.add(ContentValues())
        moerList.add(ContentValues())

        if(adapter==null){
            adapter= ElectAdapter(context,moerList)
            binding.electGrid.adapter=adapter
        }

        binding.applyElect.setOnClickListener { startActivity(Intent(context,ElectActivity::class.java)) }

    }
}
